package com.林子祺.CAT旅游系统.view.tour.admin;

import com.林子祺.CAT旅游系统.view.Menu;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class ActionComplete {

    public static void comp(){
        JFrame jf = new JFrame("操作成功");
        jf.setSize(200, 100);
        jf.setLocationRelativeTo(null);
        jf.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

        JPanel panel = new JPanel(null);
        JLabel label01 = new JLabel();
        label01.setText("操作成功");
        label01.setLocation(75,20);
        label01.setSize(100,35);
        label01.setFont(new Font(null, Font.PLAIN, 15));  // 设置字体，null 表示使用默认字体
        panel.add(label01);

        JButton btn = new JButton("返回");
        btn.setLocation(75,70);
        btn.setSize(70,25);
        btn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                AdminMenu.menu();
                jf.dispose();
            }
        });
        panel.add(btn);

        jf.setContentPane(panel);
        jf.setVisible(true);
    }

}
